<template>
  <div>
    <div class="banner" @click="handleShowGallary">
      <img src="/static/img/d1.jpg" class="banner-img" alt="">
      <div class="banner-info">
        <div class="banner-info-title">北京野生动物园(AAAA景区)</div>
        <div class="banner-info-num"><span class="iconfont banner-icon">&#xe70e;</span>11</div>
      </div>
    </div>
    <fade-animation>
      <common-gallary :imgs="imgs" v-show="showGallary" @close="closeGallary"></common-gallary>
    </fade-animation>
  </div>
</template>

<script>
import CommonGallary from 'common/gallary/Gallary'
import FadeAnimation from 'common/fade/Fade'
export default {
  name: 'DetailBanner',
  data () {
    return {
      imgs: ['d1.jpg', 'd11.jpg'],
      showGallary: false
    }
  },
  components: {
    CommonGallary,
    FadeAnimation
  },
  methods: {
    handleShowGallary () {
      this.showGallary = true
    },
    closeGallary () {
      this.showGallary = false
    }
  }
}
</script>

<style scoped lang="stylus">
  .banner
    overflow: hidden
    height: 0
    padding-bottom: 55%
    position: relative
    .banner-img
      width: 100%
    .banner-info
      position: absolute
      display: flex
      right: 0
      bottom: 0
      left: 0
      line-height: .6rem
      color: #ffffff
      background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .8))
      .banner-info-title
        flex: 1
        font-size: .32rem
        padding: 0 .2rem
      .banner-info-num
        padding: 0 .4rem
        height: .32rem
        line-height: .32rem
        margin-top: .14rem
        border-radius: .2rem
        background: rgba(0, 0, 0, .8)
        font-size: .24rem
        .banner-icon
          font-size: .24rem
</style>
